<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="./skin01/home_new_yh01.css" />
        <link rel="stylesheet" href="./css/home_new_index_reform6.css" />
        <link rel="stylesheet" href="./css/home_new_jp.css" />
    </head>

    <body>
        <div class="tuijian">
            <!--福牛解盘-->
            <div class="home_new-list">
                <div class="tztui-list-title jr-title pad15 fnjp-title">
                    <div class="btm-line">
                        <span class="title">福牛解盘</span>
                        <span class="more"> <!--更多--><i class="right-arrow"></i> </span>
                    </div>
                </div>
                <div class="fnjp-list">
                    <div>
                        <div class="skeleton skeleton-animated" style="height: 0.26rem; width: 100%"></div>
                        <div class="skeleton skeleton-animated" style="float: right; height: 0.26rem; width: 30%"></div>
                    </div>
                    <div>
                        <div
                            class="skeleton skeleton-animated"
                            style="height: 0.26rem; width: 100%; margin-top: 0.15rem"
                        ></div>
                        <div class="skeleton skeleton-animated" style="float: right; height: 0.26rem; width: 30%"></div>
                    </div>
                    <div>
                        <div
                            class="skeleton skeleton-animated"
                            style="height: 0.26rem; width: 100%; margin-top: 0.15rem"
                        ></div>
                        <div class="skeleton skeleton-animated" style="float: right; height: 0.26rem; width: 30%"></div>
                    </div>
                    <!-- <div class="fnjp-list-item">
                    <div class="content-box">
                        <img src="../zx2/img/zb.png" alt="zb">
                        <div class="title">
                            <p>独家A股五张图：小老弟，该为国接盘的时候，去追独家A股五张图：小老弟，该为国接盘的时候，去追</p>
                        </div>
                    </div>
                    <div class="content-tips">
                        <span class="origin">股市行情</span>
                        <span class="time">15:40</span>
                    </div>
                </div> -->
                </div>
                <!-- <div class="home_new-list-content kx724-box fnjp">
                <div class="swiper-container-fnjp">
                    <div class="swiper-wrapper">
                        <div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">
                            <div class="box-item">
                                <p class="box-title">
                                    <span class="title-left f6f8"></span>
                                    <span class="title-right f6f8"></span>
                                </p>
                                <p class="box-content f6f8"></p>
                            </div>
                        </div>
                        <div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">
                            <div class="box-item">
                                <p class="box-title">
                                    <span class="title-left f6f8"></span>
                                    <span class="title-right f6f8"></span>
                                </p>
                                <p class="box-content f6f8"></p>
                            </div>
                        </div>
                        <div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">
                            <div class="box-item">
                                <p class="box-title">
                                    <span class="title-left f6f8"></span>
                                    <span class="title-right f6f8"></span>
                                </p>
                                <p class="box-content f6f8"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div> -->
            </div>

            <!-- 投顾观点 -->
            <!--<div class="tougu-group tggd">
            <div class="tougu-list">
                <div class="tougu-head">
                <span class="head-img">
                    <img src="" alt="">
                </span>
                    <span class="head-name">&#45;&#45;</span>
                    <span class="head-desc">&#45;&#45;</span>
                </div>
                <div class="tougu-title">
                    <span class="title-desc">&#45;&#45;</span>
                    <span class="title-icon"></span>
                </div>
                <div class="tougu-content">&#45;&#45;</div>
                <div class="tougu-footer">
                    <span class="footer-read">&#45;&#45;</span>
                    <span class="footer-time">&#45;&#45;</span>
                </div>
            </div>
        </div>-->

            <!-- 资讯要闻 -->
            <div class="yaowen-list"></div>
        </div>
    </body>
    <script src="/home_new/js/crypto-js.js"></script>
    <script src="/home_new/js/info.js"></script>
    <script>
        function getFNJPInfo() {
            Promise.all([getJiePanNews(), queryAnalyMarketList(1, 10)])
                .then(function (res) {
                    var date_arr = [];
                    var all_arr = {};
                    var data = res[0];
                    var data1 = res[1];
                    var aGrid = data.GRID0;
                    var ln = aGrid.length;
                    if (ln) {
                        for (var i = 1; i < ln; i++) {
                            var aData = aGrid[i].split('|');
                            var _time = aData[data['PUBLISHDATE_INDEX']].split(' ')[0].replace(/-/g, '');
                            if (all_arr[_time]) {
                            } else {
                                all_arr[_time] = {};
                            }
                            if (date_arr.indexOf(_time) > -1) {
                            } else {
                                date_arr.push(_time);
                            }
                            var commonObj = {
                                id: aData[data['ID_INDEX']],
                                date: aData[data['PUBLISHDATE_INDEX']].split(' ')[0],
                                title: aData[data['TITLE_INDEX']],
                                summary: aData[data['CRTAI_SUMMARY_INDEX']],
                                time: aData[data['PUBLISHDATE_INDEX']].split(' ')[1],
                                isjump: aData[data['ISJUMP_INDEX']],
                                jumplink: aData[data['JUMPLINK_INDEX']],
                            };
                            if (aData[data['TYPE_INDEX']] == '小福早报') {
                                all_arr[_time].zbObj = commonObj;
                            }
                            if (aData[data['TYPE_INDEX']] == '小福午评') {
                                all_arr[_time].wpObj = commonObj;
                            }
                            if (aData[data['TYPE_INDEX']] == '小福晚报') {
                                all_arr[_time].wbObj = commonObj;
                            }
                            all_arr[_time].disable = true;
                            all_arr[_time].date = aData[data['PUBLISHDATE_INDEX']].split(' ')[0];
                        }
                        data1.forEach(function (item) {
                            var _date1 = item.date.replace(/-/g, '');
                            var type = item.type;
                            if (date_arr.indexOf(_date1) == -1) {
                                date_arr.push(_date1);
                            }
                            if (!all_arr[_date1]) {
                                all_arr[_date1] = {};
                            }
                            if (type == 1) {
                                //收评
                                all_arr[_date1].spObj = item;
                            } else if (type == 0) {
                                //复盘
                                all_arr[_date1].fpObj = item;
                            }
                            all_arr[_date1].disable = true;
                            all_arr[_date1].date = item.date;
                        });
                        date_arr = date_arr.sort(function (a, b) {
                            return b - a;
                        });
                        loadDom(all_arr, date_arr);
                    } else {
                        return Promise.reject();
                    }
                })
                .catch(function (e) {
                    $('.fnjp-list').hide();
                });
        }

        function getJiePanNews() {
            return new Promise(function (resolve, reject) {
                var oSendData = {
                    action: 47100,
                    ReqlinkType: 2,
                    Type: '1,7,8',
                    pageNum: 1,
                    pageSize: 3,
                    bigType: 'ZX',
                };
                $.getData({
                    oSendData: oSendData,
                    copyIsArray: false,
                    isload: false,
                    fnSuccess: function (data) {
                        resolve(data);
                    },
                    oConfig: reject,
                });
            });
        }

        //福牛解盘
        getFNJPInfo();
        // getFNJP();
        //     function getFNJP() {
        //         var oSendData = {
        //             action:'50050',/*46118*/
        //             channel_num:'1',//渠道识别，备注：可以在配置文件里面改，要和华福约定，暂时先用1
        //             menu_id:'20149',
        //             nPage: 1,
        //             maxcount: 5,
        //             ReqLinkType: '2',
        //         };
        //         $.getData({
        //             oSendData: oSendData,
        //             copyIsArray: false,
        //             isload: false,
        //             fnSuccess: function(data1) {
        //                 var all_arr={};
        //                 var date_arr=[];
        //                 //console.log("福牛解盘-复盘-收评复合：",data1);
        //                 var oSendData = {
        //                     action: 47100,
        //                     ReqlinkType: 2,
        //                     Type: "1,7,8",
        //                     pageNum: 1,
        //                     pageSize: 3,
        //                     bigType:'ZX'
        //                 };
        //                 $.getData({
        //                     oSendData: oSendData, copyIsArray: false, isload: false, fnSuccess: function (data) {
        //                         var aGrid = data.GRID0;
        //                         var ln = aGrid.length;
        //                         // console.log("早报：",data);
        //                         if (ln) {
        //                             for (var i = 1; i < ln; i++) {
        //                                 var aData = aGrid[i].split('|');
        //                                 var _time=aData[data['PUBLISHDATE_INDEX']].split(" ")[0].replace(/-/g,"");
        //                                 if(all_arr[_time]){

        //                                 }else{
        //                                     all_arr[_time]={} ;
        //                                 }
        //                                 if(date_arr.indexOf(_time)>-1){

        //                                 }else{
        //                                     date_arr.push(_time)
        //                                 }
        //                                 var commonObj ={
        //                                         "id":aData[data['ID_INDEX']],
        //                                         "date":aData[data['PUBLISHDATE_INDEX']].split(" ")[0],
        //                                         "title":aData[data['TITLE_INDEX']],
        //                                         "summary":aData[data['CRTAI_SUMMARY_INDEX']],
        //                                         "time":aData[data['PUBLISHDATE_INDEX']].split(" ")[1],
        //                                         "isjump":aData[data['ISJUMP_INDEX']],
        //                                         "jumplink":aData[data['JUMPLINK_INDEX']],
        //                                     }
        //                                 if(aData[data['TYPE_INDEX']] == "小福早报"){
        //                                     all_arr[_time].zbObj=commonObj;
        //                                 }
        //                                 if(aData[data['TYPE_INDEX']] == "小福午评"){
        //                                     all_arr[_time].wpObj=commonObj;
        //                                 }
        //                                 if(aData[data['TYPE_INDEX']] == "小福晚报"){
        //                                     all_arr[_time].wbObj=commonObj;
        //                                 }
        //                                 all_arr[_time].disable=true;
        //                                 all_arr[_time].date=aData[data['PUBLISHDATE_INDEX']].split(" ")[0];
        //                             }
        //                             var aGrid1 = data1.GRID0;
        //                             var _infocode=data1.INFOCODE,//板块资讯
        //                                 _title=data1.TITLE,//标题
        //                                 _summary=data1.SUMMARY,//摘要
        //                                 _date=data1.DATE,//日期
        //                                 _time=data1.TIME;//时间
        //                             for(var i=0;i<aGrid1.length;i++){
        //                                 var aData1 = aGrid1[i].split('|');
        //                                 var _date1=aData1[_date].replace(/-/g,"");
        //                                 if(date_arr.indexOf(_date1)>-1){
        //                                 }else{
        //                                     date_arr.push(_date1)
        //                                 }
        //                                 if(all_arr[_date1]){

        //                                 }else{
        //                                     all_arr[_date1]={} ;
        //                                 }
        //                                 if(aData1[data1.TYPE]==1){//收评
        //                                     all_arr[_date1].spObj={
        //                                         "id":aData1[_infocode],
        //                                         "date":aData1[_date],
        //                                         "title":aData1[_title],
        //                                         "summary":aData1[_summary],
        //                                         "time":aData1[_time],
        //                                     };
        //                                     all_arr[_date1].disable=true;
        //                                     all_arr[_date1].date=aData1[_date];

        //                                 }else if(aData1[data1.TYPE]==0){//复盘
        //                                     all_arr[_date1].fpObj={
        //                                         "id":aData1[_infocode],
        //                                         "date":aData1[_date],
        //                                         "title":aData1[_title],
        //                                         "summary":aData1[_summary],
        //                                         "time":aData1[_time],
        //                                     };
        //                                     all_arr[_date1].disable=true;
        //                                     all_arr[_date1].date=aData1[_date];
        //                                 }
        //                             }
        //                             console.log(all_arr,date_arr)
        //                             date_arr=date_arr.sort(function(a,b){return b-a;});
        //                             loadDom(all_arr,date_arr);
        //                             // console.log("处理过后的数据：",all_arr,date_arr)
        //                         }else{
        //                             $('.fnjp-list').hide();
        //                         }
        //                     },oConfig: function oConfig(data) {
        //                         console.log("早报报错信息",data);
        //                         $('.fnjp-list').hide();
        //                     }
        //                 });
        //             },oConfig: function oConfig(data) {
        //                 console.log("复盘-收评复合报错信息",data);
        //                 $('.fnjp-list').hide();
        //         }});
        // }

        function loadDom(dataObj, dateArr) {
            //整合数据，日期排序数组
            console.log(dataObj);
            console.log(dateArr);
            var dataLength = 0;
            var listArr = [];
            for (var i = 0; i < dateArr.length; i++) {
                for (var item in dataObj) {
                    if (item == dateArr[i]) {
                        if (isToday(dataObj[item].date)) {
                            dataLength = getDataLength(dataObj[item]);
                        }
                        //处理日期---判断是早报、收评、复盘
                        if (dataObj[item].wbObj) {
                            //存在晚报
                            dataObj[item].wbObj.type = '晚报';
                            dataObj[item].wbObj.dateTime =
                                dataObj[item].wbObj.date.replace(/-/g, '') +
                                String(dataObj[item].wbObj.time.replace(/:/g, ''));
                            listArr.push(dataObj[item].wbObj);
                        }
                        if (dataObj[item].fpObj) {
                            //存在复盘
                            dataObj[item].fpObj.type = '复盘';
                            dataObj[item].fpObj.dateTime =
                                dataObj[item].fpObj.date.replace(/-/g, '') +
                                String(dataObj[item].fpObj.time.replace(/:/g, ''));
                            listArr.push(dataObj[item].fpObj);
                        }
                        if (dataObj[item].spObj) {
                            //存在收评
                            dataObj[item].spObj.type = '收评';
                            dataObj[item].spObj.dateTime =
                                dataObj[item].spObj.date.replace(/-/g, '') +
                                String(dataObj[item].spObj.time.replace(/:/g, ''));
                            listArr.push(dataObj[item].spObj);
                        }
                        if (dataObj[item].wpObj) {
                            //存在午评
                            dataObj[item].wpObj.type = '午评';
                            dataObj[item].wpObj.dateTime =
                                dataObj[item].wpObj.date.replace(/-/g, '') +
                                String(dataObj[item].wpObj.time.replace(/:/g, ''));
                            listArr.push(dataObj[item].wpObj);
                        }
                        if (dataObj[item].zbObj) {
                            //存在早报
                            dataObj[item].zbObj.type = '早报';
                            dataObj[item].zbObj.dateTime =
                                dataObj[item].zbObj.date.replace(/-/g, '') +
                                String(dataObj[item].zbObj.time.replace(/:/g, ''));
                            listArr.push(dataObj[item].zbObj);
                        }
                    }
                }
            }
            listArr.sort(compare('dateTime')).reverse();
            renderList(listArr, dataLength);
        }

        function renderList(listArr, todayDataLength) {
            var sHtml = '';
            if (todayDataLength >= 3) {
                for (var i = 0; i < listArr.length; i++) {
                    if (isToday(listArr[i].date)) {
                        var time = listArr[i].time.substr(0, 5);
                        sHtml +=
                            '<div class="fnjp-list-item" data-isjump="' +
                            listArr[i].isjump +
                            '" data-jumplink="' +
                            listArr[i].jumplink +
                            '" data-id="' +
                            listArr[i].id +
                            '" data-fl="' +
                            getDataType(listArr[i].type).nameEn +
                            '" data-name="' +
                            listArr[i].type +
                            '">' +
                            '<div class="content-box">' +
                            '<img src="' +
                            getDataType(listArr[i].type).imgSrc +
                            '" alt="">' +
                            '<div class="title">' +
                            '<p>' +
                            listArr[i].title +
                            '</p>' +
                            '</div>' +
                            '</div>' +
                            '<div class="content-tips">' +
                            '<span class="origin"></span>' +
                            '<span class="time">' +
                            time +
                            '</span>' +
                            '</div>' +
                            '</div>';
                    }
                }
            } else {
                for (var i = 0; i < 3; i++) {
                    if (isToday(listArr[i].date)) {
                        var date = listArr[i].time.substr(0, 5);
                    } else {
                        var dateSplit = listArr[i].date.split('-');
                        var date = dateSplit[1] + '-' + dateSplit[2];
                    }
                    sHtml +=
                        '<div class="fnjp-list-item"  data-isjump="' +
                        listArr[i].isjump +
                        '" data-jumplink="' +
                        listArr[i].jumplink +
                        '" data-id="' +
                        listArr[i].id +
                        '" data-fl="' +
                        getDataType(listArr[i].type).nameEn +
                        '" data-name="' +
                        listArr[i].type +
                        '">' +
                        '<div class="content-box">' +
                        '<img src="' +
                        getDataType(listArr[i].type).imgSrc +
                        '" alt="">' +
                        '<div class="title">' +
                        '<p>' +
                        listArr[i].title +
                        '</p>' +
                        '</div>' +
                        '</div>' +
                        '<div class="content-tips">' +
                        '<span class="origin"></span>' +
                        '<span class="time">' +
                        date +
                        '</span>' +
                        '</div>' +
                        '</div>';
                }
            }
            $('.fnjp-list').html(sHtml);
            FNJPEvent();
        }

        function compare(prop) {
            return function (obj1, obj2) {
                var val1 = obj1[prop];
                var val2 = obj2[prop];
                if (!isNaN(Number(val1)) && !isNaN(Number(val2))) {
                    val1 = Number(val1);
                    val2 = Number(val2);
                }
                if (val1 < val2) {
                    return -1;
                } else if (val1 > val2) {
                    return 1;
                } else {
                    return 0;
                }
            };
        }

        function getDataType(type) {
            if (type == '早报') {
                return {
                    imgSrc: '../zx2/img/zb.png',
                    nameEn: 'zb',
                };
            }
            if (type == '午评') {
                return {
                    imgSrc: '../zx2/img/wp.png',
                    nameEn: 'wp',
                };
            }
            if (type == '晚报') {
                return {
                    imgSrc: '../zx2/img/wb.png',
                    nameEn: 'wb',
                };
            }
            if (type == '收评') {
                return {
                    imgSrc: '../zx2/img/sp.png',
                    nameEn: 'sp',
                };
            }
            if (type == '复盘') {
                return {
                    imgSrc: '../zx2/img/fp.png',
                    nameEn: 'fp',
                };
            }
        }

        function getDataLength(data) {
            var length = 0;
            if (data.zbObj) {
                length += 1;
            }
            if (data.wpObj) {
                length += 1;
            }
            if (data.wbObj) {
                length += 1;
            }
            if (data.spObj) {
                length += 1;
            }
            if (data.fpObj) {
                length += 1;
            }
            return length;
        }
        // function getFNJP() {
        //     var oSendData = {
        //         action:'50050',/*46118*/
        //         channel_num:'1',//渠道识别，备注：可以在配置文件里面改，要和华福约定，暂时先用1
        //         menu_id:'20149',
        //         nPage: 1,
        //         maxcount: 10,
        //         ReqLinkType: '2',
        //     };
        //     $.getData({oSendData:oSendData,isload:false,fnSuccess:function(data){
        //             console.log("福牛解盘：",data)
        //             if(data&&data.GRID0.length>=1) {
        //                 $('.fnjp').show();
        //                 var oData= [],zbHtml='',fpHtml='',spHtml='';
        //                 for(var j=0;j<data.GRID0.length;j++){
        //                     oData.push(data.GRID0[j].split('|'))
        //                 }
        //                 var itemHtml = '';

        //                 itemHtml += '<div class="swiper-container-fnjp">\n' +
        //                     '\t\t\t\t\t\t<div class="swiper-wrapper">';

        //                 var oSendData = {
        //                     action: 47100,
        //                     ReqlinkType: 2,
        //                     Type: "1,7,8",
        //                     pageNum:1,
        //                     pageSize:1,
        //                     bigType:'ZX'
        //                 };

        //                 $.getData({
        //                     oSendData: oSendData, copyIsArray: false, isload: false, fnSuccess: function (data1) {
        //                         var aGrid = data1.GRID0, sHtml = '',aTemp=[];
        //                         var ln = aGrid.length;
        //                         //console.log("早报111：",data1);
        //                         var aData1 = aGrid[1].split('|');
        //                         var obj={
        //                             "id":aData1[data1['ID_INDEX']],
        //                             "date":aData1[data1['PUBLISHDATE_INDEX']].split(" ")[0],
        //                             "title":aData1[data1['TITLE_INDEX']],
        //                             "summary":aData1[data1['CRTAI_SUMMARY_INDEX']],
        //                             "time":aData1[data1['PUBLISHDATE_INDEX']],
        //                             "isjump":aData1[data['ISJUMP_INDEX']],
        //                             "jumplink":aData1[data['JUMPLINK_INDEX']]
        //                         };
        //                         /*早报*/
        //                         var zbTime=aData1[data1['PUBLISHDATE_INDEX']];
        //                         if(isToday(zbTime)){
        //                             obj.time=obj.time.split(" ")[1];
        //                             obj.time=obj.time.split(":")[0]+":"+obj.time.split(":")[1];
        //                         }else{
        //                             obj.time=obj.time.split(" ")[0];
        //                             obj.time=obj.time.split("-")[1]+"-"+obj.time.split("-")[2];
        //                         }

        //                         zbHtml='<div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">' +
        //                             '<div class="box-item" data-id="'+obj.id+'" data-fl="zb" data-jumplink="'+ obj.jumplink +'" data-isjump="'+ obj.isjump +'" >' +
        //                             '<p class="box-title">' +
        //                             '<span class="title-left xfzb">小福读报</span>' +
        //                             '<span class="title-right">'+obj.time+'</span>' +
        //                             '</p>' +
        //                             '<p class="box-content">'+obj.title+'</p>' +
        //                             '</div></div>';
        //                         /*复盘*/
        //                         var fpTime='',fpDate='',fp_timehtml='';
        //                         /**/
        //                         var spTime='',spDate='',sp_timehtml='';
        //                         for(var k=0;k<oData.length;k++){
        //                             if(oData[k][data.TYPE] == 0 && fpHtml == ""){//复盘
        //                                 fpDate=oData[k][data.DATE];
        //                                 fpTime=oData[k][data.TIME];
        //                                 var fpDateTime=fpDate+" "+fpTime;
        //                                 //fpDateTime = setDateTime(fpDateTime).format("yyyy-MM-dd hh:mm:ss");
        //                                 if(isToday(fpDateTime)){
        //                                     var fpTime1=fpDateTime.split(" ")[1];
        //                                     fp_timehtml=fpTime1.split(":")[0]+":"+fpTime1.split(":")[1];
        //                                 }else{
        //                                     var fpDate1=fpDateTime.split(" ")[0];
        //                                     fp_timehtml=fpDate1.split("-")[1]+"-"+fpDate1.split("-")[2];
        //                                 }
        //                                 fpHtml='<div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">' +
        //                                     '<div class="box-item" data-id="'+oData[k][data.INFOCODE]+'" data-fl="fp">' +
        //                                     '<p class="box-title">' +
        //                                     '<span class="title-left xffp">小福复盘</span>' +
        //                                     '<span class="title-right">'+fp_timehtml+'</span>' +
        //                                     '</p>' +
        //                                     '<p class="box-content">'+oData[k][data.TITLE]+'</p>' +
        //                                     '</div></div>';
        //                             }else if(oData[k][data.TYPE] == 1 && spHtml == ""){//收评
        //                                 spDate=oData[k][data.DATE];
        //                                 spTime=oData[k][data.TIME];
        //                                 var spDateTime=spDate+" "+spTime;
        //                                 //spDateTime = setDateTime(spDateTime).format("yyyy-MM-dd hh:mm:ss");
        //                                 if(isToday(spDateTime)){
        //                                     var spTime1=spDateTime.split(" ")[1];
        //                                     sp_timehtml=spTime1.split(":")[0]+":"+spTime1.split(":")[1];
        //                                 }else{
        //                                     var spDate1=spDateTime.split(" ")[0];
        //                                     sp_timehtml=spDate1.split("-")[1]+"-"+spDate1.split("-")[2];
        //                                 }
        //                                 spHtml='<div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">' +
        //                                     '<div class="box-item" data-date="'+ spDate +'" data-fl="sp" data-id="'+oData[k][data.INFOCODE]+'">' +
        //                                     '<p class="box-title">' +
        //                                     '<span class="title-left xfsp">小福收评</span>' +
        //                                     '<span class="title-right">'+sp_timehtml+'</span>' +
        //                                     '</p>' +
        //                                     '<p class="box-content">'+oData[k][data.TITLE]+'</p>' +
        //                                     '</div></div>';
        //                             }
        //                         }
        //                         if(T.judge('ISIOS')) {
        //                             zbTime=zbTime.replace(/-/g,"/");
        //                             spDate=spDate.replace(/-/g,"/");
        //                             fpDate=fpDate.replace(/-/g,"/");
        //                         }
        //                         //console.log("转换前：",zbTime,fpDate,spDate);
        //                         var timeZB=new Date(zbTime),timeFP=new Date(fpDate+" "+fpTime),timeSP=new Date(spDate+" "+spTime);
        //                         //console.log("转换后：",timeZB,timeFP,timeSP);
        //                         if(timeZB>timeFP){
        //                             if(timeZB>timeSP){
        //                                 itemHtml+=zbHtml;
        //                                 if(timeSP>timeFP){
        //                                     itemHtml+=spHtml+fpHtml;
        //                                 }else{
        //                                     itemHtml+=fpHtml+spHtml;
        //                                 }
        //                             }else{
        //                                 itemHtml+=spHtml+zbHtml+fpHtml;
        //                             }
        //                         }else{
        //                             if(timeFP>timeSP){
        //                                 itemHtml+=fpHtml;
        //                                 if(timeSP>timeZB){
        //                                     itemHtml+=spHtml+zbHtml;
        //                                 }else{
        //                                     itemHtml+=zbHtml+spHtml;
        //                                 }
        //                             }else{
        //                                 itemHtml+=spHtml+fpHtml+zbHtml;
        //                             }
        //                         }

        //                         //itemHtml+=zbHtml+spHtml+fpHtml;
        //                         itemHtml+='<div class="sfckgd-p"><div class="sfckgd">释放查看更多 <img src="./images/sf_right.png" alt=""></div></div>';

        //                         itemHtml+='</div></div>';
        //                         $('.fnjp').html(itemHtml);

        //                         //$('.fnjp .swiper-wrapper').html(itemHtml);
        //                         FNJPEvent();
        //                         oVal.swiper_fnjp = new Swiper('.swiper-container-fnjp', {
        //                             slidesPerView: 'auto',
        //                             spaceBetween: 10,
        //                             slidesOffsetAfter : 5,
        //                             onTouchEnd: function(swiper,event){
        //                                 var _slide=$(".fnjp .swiper-slide");
        //                                 var _width=_slide.width();
        //                                 if(_slide.length==2){
        //                                     if(swiper.translate<-50){
        //                                         if(oVal.configData.THS_MZ_KEY || oVal.configData.THS_MZ_KEY == "0"){
        //                                             //旧版资讯推荐
        //                                             var oSend={ url: '/zx2/zx_lmt.html?type=hf'};
        //                                             oSend.tzthiddentitle = 1;//客户端隐藏导航栏
        //                                             oSend.tztadjustnever = 1;
        //                                             T.fn.action10061(oSend);
        //                                         }else{
        //                                             T.fn.changeurl('http://action:58114/?TitleSkinType=1&&firsttext=资讯&&secondtext=数据&&rightfunctionname=rightfunc&&firsturl=/zx2/zx_list.html?type=fnjp&&secondurl=https://b2b-api.10jqka.com.cn/b2bgw/resource/h5/private/HFZQ/latest/home_newpage/home_newpage/index.html#/?ckey=608028110045')
        //                                         }
        //                                     }
        //                                 }else{
        //                                     if((swiper.translate+_width)<-50){
        //                                         if(oVal.configData.THS_MZ_KEY || oVal.configData.THS_MZ_KEY == "0"){
        //                                             //旧版资讯推荐
        //                                             var oSend={ url: '/zx2/zx_lmt.html?type=hf'};
        //                                             oSend.tzthiddentitle = 1;//客户端隐藏导航栏
        //                                             oSend.tztadjustnever = 1;
        //                                             T.fn.action10061(oSend);
        //                                         }else{
        //                                             T.fn.changeurl('http://action:58114/?TitleSkinType=1&&firsttext=资讯&&secondtext=数据&&rightfunctionname=rightfunc&&firsturl=/zx2/zx_list.html?type=fnjp&&secondurl=https://b2b-api.10jqka.com.cn/b2bgw/resource/h5/private/HFZQ/latest/home_newpage/home_newpage/index.html#/?ckey=608028110045')
        //                                         }
        //                                     }
        //                                 }
        //                             },
        //                         });
        //                     },oConfig:function(error){
        //                         // console.log("早报接口报错：",error);
        //                         $('.fnjp').hide();
        //                     }
        //                 });
        //             }else{
        //                 $('.fnjp').hide();
        //             }
        //         },oConfig:function(error){
        //             // console.log("福牛接盘接口报错：",error);
        //             $('.fnjp').hide();
        //         }});
        // }
        function FNJPEvent() {
            //跳转福牛解盘
            $('.fnjp-list .fnjp-list-item')
                .off()
                .on('click', function () {
                    var title = $(this).attr('data-name');
                    //小福复盘，小福收评，小福早报事件埋点
                    track.sensors.track('second_list_click', {
                        bottomtabbar_name: '探索',
                        toptabbar_name: '首页',
                        first_list_name: '资讯',
                        second_list_type: '详情',
                        second_list_name: title,
                    });

                    // 首页栏位点击-福牛解盘-栏目
                    pageSensors.reportClick('mainPageColumnClick', {
                        column_type: '福牛解盘',
                        column_name: title,
                        column_no: $(this).parent().index(),
                    });

                    // if(oVal.configData.THS_MZ_KEY || oVal.configData.THS_MZ_KEY == "0"){
                    //     //旧版资讯推荐
                    //     var oSend={ url: '/zx2/zx_lmt.html?type=hf'};
                    //     oSend.tzthiddentitle = 1;//客户端隐藏导航栏
                    //     oSend.tztadjustnever = 1;
                    //     T.fn.action10061(oSend);
                    // }else{
                    //     T.fn.changeurl('http://action:58114/?TitleSkinType=1&&firsttext=资讯&&secondtext=数据&&rightfunctionname=rightfunc&&firsturl=/zx2/zx_list.html?type=fnjp&&secondurl=https://b2b-api.10jqka.com.cn/b2bgw/resource/h5/private/HFZQ/latest/home_newpage/home_newpage/index.html#/?ckey=608028110045')
                    // }

                    var sId = $(this).attr('data-id');
                    var obj = '';
                    if (
                        $(this).attr('data-fl') == 'zb' ||
                        $(this).attr('data-fl') == 'wb' ||
                        $(this).attr('data-fl') == 'wp'
                    ) {
                        if ($(this).attr('data-isjump') == 1) {
                            obj = {
                                url: $(this).attr('data-jumplink').trim(),
                            };
                        } else {
                            obj = {
                                url: '/zx2/zx_zxxq.html?id=' + sId + '&&type=huafu',
                            };
                        }
                    } else if ($(this).attr('data-fl') == 'sp') {
                        //return;
                        var _date = $(this).attr('data-date');
                        obj = {
                            url: '/zx2/zx_zxxq.html?id=' + sId + '&&menu_id=002' + '&&type=clszx&&date=' + _date,
                        };
                    } else {
                        obj = {
                            url: '/zx2/zx_zxxq.html?id=' + sId + '&&menu_id=002' + '&&type=clszx',
                        };
                    }
                    var oSend = { url: obj.url };
                    if ($(this).attr('data-fl') == 'zb') {
                        oSend.secondtext = '早报';
                    } else {
                        oSend.secondtype = '98';
                        oSend.secondtext = 'tzt_zx.png';
                        oSend.secondjsfuncname = 'tztPageSecodeFun()';
                    }

                    T.fn.action10061(oSend);
                });
            $('.fnjp-title .more')
                .off()
                .on('click', function () {
                    if (oVal.configData.THS_MZ_KEY || oVal.configData.THS_MZ_KEY == '0') {
                        //旧版资讯推荐
                        var oSend = { url: '/zx2/zx_lmt.html?type=hf' };
                        oSend.tzthiddentitle = 1; //客户端隐藏导航栏
                        oSend.tztadjustnever = 1;
                        T.fn.action10061(oSend);
                    } else {
                        T.fn.changeurl(
                            'http://action:58114/?TitleSkinType=1&&firsttext=资讯&&secondtext=数据&&rightfunctionname=rightfunc&&firsturl=/zx2/zx_list.html?type=fnjp&&secondurl=https://b2b-api.10jqka.com.cn/b2bgw/resource/h5/private/HFZQ/latest/home_newpage/home_newpage/index.html#/?ckey=608028110045'
                        );
                    }
                });
        }
        function isToday(str) {
            return new Date().toDateString() === new Date(str.replace(/-/g, '/')).toDateString(); //ios中时间转换new Date()不兼容横杆'-'问题，转为斜杠‘/’
        }
        Date.prototype.format = function (fmt) {
            var o = {
                'M+': this.getMonth() + 1, //月份
                'd+': this.getDate(), //日
                'h+': this.getHours(), //小时
                'm+': this.getMinutes(), //分
                's+': this.getSeconds(), //秒
                'q+': Math.floor((this.getMonth() + 3) / 3), //季度
                S: this.getMilliseconds(), //毫秒
            };
            if (/(y+)/.test(fmt)) {
                fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
            }
            for (var k in o) {
                if (new RegExp('(' + k + ')').test(fmt)) {
                    fmt = fmt.replace(
                        RegExp.$1,
                        RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
                    );
                }
            }
            return fmt;
        };
        function dateStrTG(date) {
            //console.log(date)
            var nowDate = new Date();
            var time = nowDate.getTime();
            var nowyear = nowDate.getFullYear();
            var year = date.substr(0, 4);
            var month = Number(date.substr(5, 2));
            var day = Number(date.substr(8, 2));
            var hour = Number(date.substr(11, 2));
            var minute = Number(date.substr(14, 2));
            var second = Number(date.substr(17, 2));
            var newDate = new Date(year, month - 1, day, hour, minute, second).getTime();
            time = parseInt((time - newDate) / 1000);
            var s;
            if (time < 60 * 5) {
                //五分钟内
                return '刚刚';
            } else if (time < 60 * 60 && time >= 60 * 5) {
                //超过十分钟少于1小时
                s = Math.floor(time / 60);
                return s + '分钟前';
            } else if (time < 60 * 60 * 24 && time >= 60 * 60) {
                //超过1小时少于24小时
                s = Math.floor(time / 60 / 60);
                return s + '小时前';
            } else if (time < 60 * 60 * 24 * 3 && time >= 60 * 60 * 24) {
                //超过1天少于3天内
                s = Math.floor(time / 60 / 60 / 24);
                return s + '天前';
            } else {
                //超过3天
                return date;
                /*if (year == nowyear) {
                return date.substr(5,5);
            }else{
                return date.split(" ")[0];
            }*/
            }
        }

        /*投顾*/
        // var testIp='';
        // oVal.tgPageNum = 1;
        // getTGGD();
        // function getTGGD() {
        //     $.getData({
        //         oSendData:{
        //             action:'49245',
        //             ReqlinkType:"2",
        //             funcNo: '1106403',
        //             cur_page: oVal.tgPageNum,
        //             num_per_page: "10",
        //             dataType: "json",
        //             method:'post'
        //         },
        //         isload:false,
        //         fnSuccess:function(data){
        //             if(data) {
        //                 if(data.DATA){
        //                     $('.tougu-group').show();
        //                     testIp = data.ERRORMESSAGE;
        //                     var oData = $.parseJSON($.parseJSON(data.DATA));
        //                     oData = oData[0].data;
        //                     console.log(oData);
        //                     var itemHtml = '';
        //                     for(var i = 0; i < oData.length; i++) {
        //                         var face_image_small = oVal.tgJumpId + oData[i].face_image_small,
        //                             invest_id = oData[i].invest_id,
        //                             introdution = oData[i].introdution,
        //                             read_num = oData[i].read_num,
        //                             title = oData[i].title,
        //                             view_type = oData[i].view_type,
        //                             invest_label = oData[i].invest_label,//1=金牌投顾，2=明星投顾，3=投资顾问
        //                             create_time = oData[i].create_time,
        //                             is_pay = oData[i].is_pay,//是否付费
        //                             invest_name = oData[i].invest_name;
        //                         create_time = dateStrTG(create_time);
        //                         var className = "";
        //                         if(invest_label == "1"){
        //                             invest_label = "金牌投顾";
        //                             className = "tougu-jp"
        //                         }else if(invest_label == "2"){
        //                             invest_label = "明星投顾";
        //                             className = "tougu-mx"
        //                         }else if(invest_label == "3"){
        //                             invest_label = "投资顾问";
        //                         }else{
        //                             invest_label = "";
        //                         }
        //                         var payHtml = "";
        //                         if(is_pay == "1"){
        //                             payHtml = "<em>付费</em>";
        //                         }
        //                         itemHtml += '<div class="tougu-list" data-id="'+ invest_id +'">\n' +
        //                             '                <div class="tougu-head">\n' +
        //                             '                <span class="head-img">\n' +
        //                             '                    <img src="'+ face_image_small +'" alt="">\n' +
        //                             '                </span>\n' +
        //                             '                    <span class="head-name">'+ invest_name +'</span>\n' +
        //                             '                    <span class="head-desc '+ className +'"><em>'+ invest_label +'</em></span>\n' +
        //                             '                </div>\n' +
        //                             '                <div class="tougu-title">\n' +
        //                             '                    <span class="title-desc">'+ title + payHtml +'</span>\n' +
        //                             '                    <span class="title-icon"></span>\n' +
        //                             '                </div>\n' +
        //                             '                <div class="tougu-content">'+ introdution +'</div>\n' +
        //                             '                <div class="tougu-footer">\n' +
        //                             '                    <span class="footer-read">'+ read_num +'人正在观看</span>\n' +
        //                             '                    <span class="footer-time">'+ create_time +'</span>\n' +
        //                             '                </div>\n' +
        //                             '            </div>'
        //                     }
        //
        //                     if(oVal.tgPageNum == 1){
        //                         $(".tougu-group").html(itemHtml);
        //                     }else{
        //                         $(".tougu-group").append(itemHtml);
        //                     }
        //                     oVal.loadTGFlag = true;
        //                     TGGDEvent();
        //                 }else{
        //                     if(oVal.tgPageNum == 1){
        //                         $('.tougu-group').hide();
        //                     }
        //                 }
        //             }else{
        //                 if(oVal.tgPageNum == 1){
        //                     $('.tougu-group').hide();
        //                 }
        //             }
        //         },oConfig:function(error){
        //             if(oVal.tgPageNum == 1){
        //                 $('.tougu-group').hide();
        //             }
        //         }});
        // }
        // function TGGDEvent(){
        //     //跳转观点详情
        //     $('.tggd .tougu-list').off().on('click',  function() {
        //         //牛人观点事件埋点
        //         var location = $(this).attr('data-location');
        //         track.sensors.track('second_list_click', {
        //             'bottomtabbar_name': '探索',
        //             'toptabbar_name': '首页',
        //             'first_list_name': '牛人观点',
        //             'second_list_type': '列表位置',
        //             'second_list_name': location
        //         });
        //         var id = $(this).data('id');
        //         //var url = testIp + '/m/ytg/views/loadPage.html?toPagecode=point/detail&view_id=' + id + '&source_id=hzzz';
        //         var url = testIp + '/m/app/#/?toPagecode=viewDetail&view_id=' + id + '&source_id=hzzz';
        //         tgFunc(url);
        //     })
        // }
        // function tgFunc(url){
        //     T.readLocalMesg(['jyloginflag','logintype=1','MOBILECODE','usercode'],function(oLocal){
        //         var MOBILECODE=oLocal.MOBILECODE;
        //         var USERCODE=oLocal.USERCODE;
        //         if(MOBILECODE=='' || !MOBILECODE||MOBILECODE=='null'){
        //             //console.log(url);
        //             T.fn.action10061({url:url,'tzthiddentitle':'1','tztadjustnever':'1'});
        //         }else{
        //             if(oLocal.JYLOGINFLAG <=1){ //未登录
        //                 var oSend = {
        //                     action:'5',
        //                     needToken:'0'
        //                 }
        //                 $.getData({oSendData:oSend,isToken:false ,fnSuccess:function(oTime){
        //                         var serverTime = oTime.TIME;
        //                         var oSend = {
        //                             action:'46200',
        //                             ReqlinkType:2,
        //                         };
        //                         $.getData({oSendData:oSend, fnSuccess:function(oData){
        //                                 var PUBLICK_KEY = oData.TG,MD5_KEY = oData.HSSTRING;
        //                                 var str = JSON.stringify({mobile:MOBILECODE,from:'sidi',time:serverTime});
        //                                 //处理rsa和md5key
        //                                 var senddata = encryptRsaTg(PUBLICK_KEY,MD5_KEY,str);
        //                                 var oUrl = url+ '&data='+ encodeURIComponent(senddata.data);
        //                                 //console.log(oUrl);
        //                                 //console.log(senddata.data);
        //                                 if (T.appversion.andriod()) {
        //                                     T.fn.action10061({url:url+'&data=' +encodeURIComponent(encodeURIComponent(senddata.data)),'tzthiddentitle':'1','tztadjustnever':'1'});
        //                                 } else {
        //                                     T.fn.action10061({url:oUrl,'tzthiddentitle':'1','tztadjustnever':'1'});
        //                                 }
        //                             }});
        //                     }});
        //             }else{
        //                 var oSend = {
        //                     action:'5',
        //                     needToken:'0'
        //                 }
        //                 $.getData({oSendData:oSend,isToken:false ,fnSuccess:function(oTime){
        //                         var serverTime = oTime.TIME;
        //                         /*if(oLocal.JYLOGINFLAG <=1){ //未登录
        //                             T.fn.action10061({url:url,'tzthiddentitle':'1','tztadjustnever':'1'});
        //                         }else{*/
        //                         var oSendData = {
        //                             action:6771,
        //                             ReqlinkType:'1'
        //                         }
        //                         $.getData({oSendData:oSendData, fnSuccess:function(reg){
        //                                 var SERVTICKET_ID = reg.SERVTICKET_ID;
        //                                 var oSend = {
        //                                     action:'46200',
        //                                     ReqlinkType:2,
        //                                 };
        //                                 $.getData({oSendData:oSend, fnSuccess:function(oData){
        //                                         var PUBLICK_KEY = oData.TG,MD5_KEY = oData.HSSTRING;
        //                                         var str = JSON.stringify({token:SERVTICKET_ID,mobile:MOBILECODE,client_id:USERCODE,from:'sidi',time:serverTime});
        //                                         //处理rsa和md5key
        //                                         var senddata = encryptRsaTg(PUBLICK_KEY,MD5_KEY,str);
        //                                         var oUrl = url+ '&data='+ senddata.data;
        //                                         if (T.appversion.andriod()) {
        //                                             T.fn.action10061({url:url+'&data=' +encodeURIComponent(encodeURIComponent(senddata.data)),'tzthiddentitle':'1','tztadjustnever':'1'});
        //                                         } else {
        //                                             T.fn.action10061({url:oUrl,'tzthiddentitle':'1','tztadjustnever':'1'});
        //                                         }
        //                                     }});
        //                             }});
        //                         /*}*/
        //                     }});
        //             }
        //         }
        //     });
        // }
        // oVal.loadTGFlag = true;

        /*要闻-资讯*/
        oVal.jiepanPageNum = 1;
        oVal.loadJPFlag = true;
        oVal.infoOffset = '0'; //取接口返回的字段
        getYaoWenInfo();
        function getYaoWenInfo() {
            // if(oVal.configData.THS_MZ_KEY || oVal.configData.THS_MZ_KEY == "0"){
            //     //旧版资讯推荐
            //     getOldYaoWenInfo()
            // }else{
            //
            // }
            // console.log(oVal.jiepanPageNum);
            var oSendData = {
                action: '31020',
                param: JSON.stringify({
                    accessKey: 'e6ce431bd537718a',
                    infoOffset: oVal.infoOffset, //当前已遍历查询的资讯页数，默认为 0
                    page: oVal.jiepanPageNum - 1,
                }),
                ReqLinkType: '2',
            };
            $.getData({
                oSendData: oSendData,
                copyIsArray: false,
                isload: false,
                fnSuccess: function (data) {
                    // console.log("解盘-要闻",data,JSON.parse(data.BINDATA));
                    var sHtml = '';
                    if (data.BINDATA) {
                        var _result = JSON.parse(data.BINDATA).data;
                        oVal.infoOffset = JSON.parse(data.BINDATA).infoOffset;
                        if (_result.length > 0) {
                            oVal.ywNextPage = JSON.parse(data.BINDATA).hasNext;
                            for (var i = 0; i < _result.length; i++) {
                                var obj = {};
                                obj.id = _result[i].itemId; //id
                                obj.ctime = _result[i].time; //时间，日期
                                obj.imgUrl = _result[i].imgUrl; //图片
                                obj.source = _result[i].source; //来源
                                obj.title = _result[i].title; //标题
                                obj.copyright = _result[i].copyright; //有无版权
                                obj.url = _result[i].url; //无版权时的三方地址

                                if (obj.copyright && obj.copyright == '1') {
                                    sHtml += loadDOM_TT(obj);
                                }
                            }
                        } else {
                        }
                    }
                    if (oVal.jiepanPageNum == '1') {
                        $('.yaowen-list').html(sHtml);
                    } else {
                        $('.yaowen-list').append(sHtml);
                    }
                    pageUrl();
                    oVal.loadJPFlag = true;
                },
                oConfig: function () {},
            });
        }
        function loadDOM_TT(data) {
            var readClass = '';
            // if(readId.toString().indexOf(data.id) > -1){
            //     readClass='zx-read-name';
            // }
            var newDate = dateStr(formatDate(data.ctime));
            //var newDate = formatDateHM(data.ctime);
            var sHtml =
                '<li class="zx-list" data-copyright="' +
                data.copyright +
                '" data-url="' +
                data.url +
                '" data-id="' +
                data.id +
                '"  data-time="' +
                formatDate(data.ctime) +
                '"  data-title="' +
                data.title +
                '"  data-source="' +
                data.source +
                '">' +
                // +'<img  src="'+ data.imgUrl +'" onload=this.nextSibling.style.display="none"; class="img">'
                // +'<img  src="./img/moren.png" class="none">'
                '<p class="zx-name ' +
                readClass +
                '">' +
                data.title +
                '</p><p class="zx-foot">' +
                '<span class="zx-date">' +
                newDate +
                '</span>' +
                '<span class="zx-media" style="float: right;padding-right: 0.1rem;">' +
                data.source +
                '</span></p>' +
                '</li>';
            return sHtml;
        }
        function formatDate(timestamp) {
            var date = new Date(timestamp * 1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
            var Y = date.getFullYear(),
                M = date.getMonth() + 1 < 10 ? date.getMonth() + 1 : date.getMonth() + 1,
                D = date.getDate(),
                h = date.getHours(),
                m = date.getMinutes(),
                s = date.getSeconds();
            M = M < 10 ? '0' + M : M;
            D = D < 10 ? '0' + D : D;
            h = h < 10 ? '0' + h : h;
            m = m < 10 ? '0' + m : m;
            s = s < 10 ? '0' + s : s;
            return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
        }
        function pageUrl() {
            var action = 'read.txt';
            $('.zx-list')
                .off()
                .on('click', function () {
                    var sId = $(this).attr('data-id'),
                        time = $(this).attr('data-time'),
                        source = $(this).attr('data-source'),
                        jumpurl = $(this).attr('data-url'),
                        copyright = $(this).attr('data-copyright'),
                        title = $(this).attr('data-title');
                    var obj = {
                        url:
                            '/zx2/zx_zxxq.html?type=ths&id=' +
                            sId +
                            '&time=' +
                            encodeURIComponent(time) +
                            '&source=' +
                            encodeURIComponent(source),
                    };
                    var oSend = { url: obj.url };

                    pageSensors.reportClick('mainPageColumnClick', {
                        column_type: '福牛解盘',
                        column_name: title,
                        column_no: $(this).index(),
                    });

                    // $(this).find(".zx-name").addClass('zx-read-name');
                    if (readId.toString().indexOf(sId) == -1) {
                        readId.push(sId);
                    }
                    T.saveMapMesg({ THSPAGETITLE: title }, function () {});
                    T.saveFileMesg(readId, action, function (oData) {
                        T.readFileMesg(action, function (oData) {
                            if (copyright == '1') {
                                TZT.fn.action10061(oSend);
                            } else {
                                TZT.fn.action10061({ url: jumpurl });
                            }
                        });
                    });
                });
        }

        $('.page-wrapper')
            .off('scroll')
            .scroll(function () {
                //控制首页顶部显示，与客户端交互
                reqrolloffset();
                var scrollTop = $('.page-wrapper').scrollTop();
                var headerHeight = $('.header').height();
                var scrollHeight = $('.more-page').height() + headerHeight; //总高度
                var screenHeight = $('body').height(); //屏幕高度
                var appHeight = $('.app-header').height();
                if (commonFunction.compareVersion(oVal.currVersion, oVal.limitedVersion)) {
                    appHeight = 0;
                }
                if (scrollTop >= headerHeight - appHeight) {
                    $('.nav-group').addClass('nav-group-fixed');
                    if (appHeight != '0') {
                        $('.nav-group').css('top', appHeight + 'px');
                        $('.title-bar').css({
                            display: 'block',
                            position: 'fixed',
                            height: appHeight + 'px',
                            width: '100%',
                            top: '0px',
                            'z-index': '2',
                        });
                    }
                } else {
                    $('.nav-group').removeClass('nav-group-fixed');
                    if (appHeight != '0') {
                        $('.nav-group').css('top', 'inherit');
                        $('.title-bar').css({ display: 'none', position: 'relative', height: '0px' });
                    }
                }
                if (scrollTop + screenHeight * 2 >= scrollHeight) {
                    if (!!oVal.loadJPFlag && !!oVal.ywNextPage) {
                        // console.log("加载数据");
                        oVal.loadJPFlag = false;
                        oVal.jiepanPageNum++;
                        getYaoWenInfo();
                    }
                }
            });
    </script>
</html>
